﻿<!DOCTYPE html>
<html>
<head>
    <title>Member</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="<?=base_url();?>css/admin.css" rel="stylesheet" type="text/css" />
	<link href="<?=base_url();?>public/css/flexigrid.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<?=base_url();?>public/js/jquery.pack.js"></script>
	<!-- <script type="text/javascript" src="<?=base_url();?>public/js/flexigrid.pack.js"></script>  -->
	<script type="text/javascript" src="<?=base_url();?>public/js/flexigrid.js"></script>
	<script type="text/javascript">
	function rowClick(celDiv, id){
		 $(celDiv).click(
		  function() { 
		   	window.location.href = "./detail/"+id;
		  }
		    )
		}
	</script>
</head>
<body>

 <div id="contentright">
        <div id="search">
          <div id="searchblank">
            <div id="searchinput">
             Welcome, admin
            </div>
          
            <div id="advancesearch"><a href="<?php echo site_url('login/logout');?>" class="advancesearch">Logout</a></div>
          </div>
        </div>
        </div>
    <div id="main">
       <?php 
        $menu['nowmenu'] = 'members';
        $this->load->view('common/divheader',$menu);
        ?>
        <div id="middle">
        <div id="breadcrumbs"><a href="dashboard.html">Dashboard</a>/ สมาชิก</div>
            <?php $this->load->view('users/divleftmenu');?>
            <div id="center-column">
			
			
                <div class="top-bar">
                    <a href="<?php echo site_url('users/form');?>" class="button">ADD NEW </a>
                    <h1>Members</h1>
                    
              </div>
              <div class="table">
                <?php
echo $js_grid;
?>
<script type="text/javascript">

function test(com,grid)
{
    if (com=='Select All')
    {
		$('.bDiv tbody tr',grid).addClass('trSelected');
    }
    
    if (com=='DeSelect All')
    {
		$('.bDiv tbody tr',grid).removeClass('trSelected');
    }
    
    if (com=='Delete')
        {
           if($('.trSelected',grid).length>0){
			   if(confirm('Delete ' + $('.trSelected',grid).length + ' items?')){
		            var items = $('.trSelected',grid);
		            var itemlist ='';
		        	for(i=0;i<items.length;i++){
						itemlist+= items[i].id.substr(3)+",";
					}
					$.ajax({
					   type: "POST",
					   url: "<?=site_url("/ajax/deletec");?>",
					   data: "items="+itemlist,
					   success: function(data){
					   	$('#flex1').flexReload();
					  	alert(data);
					   }
					});
				}
			} else {
				return false;
			} 
        }          
} 
</script>
<table id="flex1" style="display:none"></table>
			</div>
				
				
            </div>
            <div id="right-column">
                <strong class="h">Quick Link</strong>
                <div class="box">This is your admin home page. It will give you access to all things within the back end system that you will need to facilitate a smooth operation.</div>
            </div>
        </div>
        <div id="footer"><p>ALL RIGHTS RESERVED 2012 <a href="http://www.ubonbioethanol.com">UBON BIO ETHANOL CO., LTD.</a><br>Developed by DASH CO., LTD (2011-2012).  </p></div>
    </div>
</body>
</html>